<?php


namespace app\api\model;


use think\Model;

class ListModel extends Model
{

    // 表名
    protected $name = 'news_list';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
    ];

    public function getTitleImageAttr($val)
    {
        if(empty($val)){
            return '';
        }
        append_domain($val);
        return $val;
    }

    public function getAuthorImageAttr($val)
    {
        if(empty($val)){
            return '';
        }
        append_domain($val);
        return $val;
    }
}